<div class="module-c2c">
    <ol class="breadcrumb fn-clearfix">
        <li>c2c / 申诉</li>
    </ol>
    <div class="module-complaint">

        <div class="form-group">
            <select class="form-control" ng-model="vm.complainType" ng-change="vm.fetchComplaintList()">
                <option value="" selected>选择买方/卖方申诉</option>
                <option value="BUY">买方申诉</option>
                <option value="SELL">卖方申诉</option>
            </select>
        </div>

        <ul class="tab-ul">
            <li class="tab-li" ng-click="vm.toggleTab('SELL')" ng-class="{'tab-li--selected':vm.orderTypeHistory==='SELL'}">售卖区待审核</li>
            <li class="tab-li" ng-click="vm.toggleTab('PURCHASE')" ng-class="{'tab-li--selected':vm.orderTypeHistory==='PURCHASE'}">收购区待审核</li>
            <li class="tab-li" ng-click="vm.toggleTab('PROCESSED','SELL')" ng-class="{'tab-li--selected':vm.orderTypeHistory==='SELLHistory'}">售卖区审核历史</li>
            <li class="tab-li" ng-click="vm.toggleTab('PROCESSED','PURCHASE')" ng-class="{'tab-li--selected':vm.orderTypeHistory==='PURCHASEHistory'}">收购区待审核历史</li>
        </ul>
        <div class="ui-box">
            <table class="table table-bordered table-striped table-hover">
                <thead>
                    <tr>
                        <th width="10%">申诉时间</th>
                        <th width="10%">申诉编号</th>
                        <th width="12%">原订单号</th>
                        <th width="8%">申诉类型</th>
                        <th width="8%">订单状态</th>
                        <th width="10%">买家联系方式</th>
                        <th width="10%">卖家联系方式</th>
                        <!--<th width="10%">数量</th>-->
                        <th width="10%">申诉原因</th>
                        <th width="12%" ng-if="vm.status==='PROCESSING'">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="item in vm.list" ng-if="vm.isLoading === false && vm.list.length > 0">
                        <td>{{$root.moment(item.createDate).utc().utcOffset($root.ZONE).format('YYYY-MM-DD HH:mm:ss')}}</td>
                        <td>{{item.complainId}}</td>
                        <td>{{item.transOrderId}}</td>
                        <td>{{vm.config.TRADE_TYPE[item.complainType]}}</td>
                        <td>{{vm.config.TRANS_STATUS[item.transOrderStatus]}}</td>
                        <td>{{item.buyPhone}}</td>
                        <td>{{item.sellPhone}}</td>
                        <!--<td>{{item.sellPhone}}</td>-->
                        <td class="td-ellipsis">{{item.remark}}</td>
                        <td ng-if="vm.status==='PROCESSING'">
                            <a href="javascript:;" ng-click="vm.goDetail(item.complainId,vm.orderTypeHistory)">详情</a>
                            <a href="javascript:;" ng-if="item.transOrderStatus !== 'FINISHED' && item.transOrderStatus !== 'CANCELED' && item.transOrderStatus !== 'OVERTIME'"
                                ng-click="vm.transforForce(item.complainId)">强制打币</a>
                            <a href="javascript:;" ng-if="item.transOrderStatus !== 'FINISHED' && item.transOrderStatus !== 'CANCELED' && item.transOrderStatus !== 'OVERTIME'"
                                ng-click="vm.closeForce(item.complainId)">强制关闭订单</a>
                        </td>
                    </tr>
                    <tr class="ui-no-data" ng-if="vm.isLoading === false && (vm.list.length === 0||vm.list===null)">
                        <td colspan="10">暂无数据</td>
                    </tr>
                    <tr class="ui-loading" ng-if="vm.isLoading === true">
                        <td colspan="10">正在加载，请稍候...</td>
                    </tr>
                </tbody>
            </table>

            <div class="ui-pager-box" v-if="vm.totalNum > 0">
                <ul uib-pagination previous-text="上一页" next-text="下一页" first-text="首页" last-text="尾页" total-items="vm.totalNum"
                    ng-model="vm.condition.pageNo" max-size="5" items-per-page="vm.condition.pageSize || 10" align="right"
                    class="pagination" boundary-links="true" ng-change="vm.pageChanged()" rotate="false"></ul>
            </div>
        </div>

    </div>
</div>